﻿@using KimPhongCRM.Lib
@model List<KimPhongCRM.Models.sp_Select_KhachHang_Birthday_Result>
<li class="dropdown hidden-phone">
    <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
        <i class="font-icon-gift icon-white"></i><span class="label label-warning hidden-phone">@Model.Count()</span>
    </a>
    <ul class="dropdown-menu tasks">
        <li>
            <span class="dropdown-menu-title">Có @Model.Count() sinh nhật khách hàng trong tuần</span>
        </li>
        @foreach (var value in Model)
        {
            int percent = ((int)value.conlai * 100) / 7;
            <li class="birthday">
                <a id="sinhnhat-click" href="@Url.Action("SetPopup", "Popup", new { id = @value.maKH, table = "KhachHang" })">
                    <span class="header">
                        <span class="title">@value.hoKH @value.tenKH</span>
                        <span class="leftday">
                            @if (value.conlai == 0) { Write("hôm nay"); } else { Write(value.conlai.ToString() + " ngày"); }
                        </span>
                    </span>
                    <div class="taskProgress progressSlim progressYellow ui-progressbar ui-widget ui-widget-content ui-corner-all" role="progressbar" aria-valuemin="0" aria-valuemax="7" aria-valuenow="@value.conlai">
                        <div class="ui-progressbar-value ui-widget-header ui-corner-left" style="width: @{@percent}%;"></div>
                    </div>
                </a>
            </li>
        }
        <li>
            <a href="@Url.Action("Birthday","KhachHang")" class="dropdown-menu-sub-footer">Xem tất cả</a>
        </li>
    </ul>
</li>
